<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 邮箱验证
        var re = /^\w+@[a-z0-9]+\.[a-z]{2,4}$/;

        var email = "1442526564@qq.co1m";

        // console.log(re.test(email))

        // 去行首行尾空格
        var re2 = /^\s+|\s+$/g;
        var str2 = "  2sss  @qq.  666 co1m  ";
        console.log("("+ str2.replace(re2, '') +")")





















    </script>
</body>
</html>